from apps.meiduo_admin.utils import PageNum
from rest_framework.viewsets import ModelViewSet
from apps.goods.models import SpecificationOption
from apps.meiduo_admin.serializers.option import SpecificationOptionSerializer,SpecSerializer
from rest_framework.generics import ListAPIView
from apps.goods.models import SPUSpecification


class SpecificationOptionModelViewSet(ModelViewSet):
    queryset = SpecificationOption.objects.all()
    serializer_class = SpecificationOptionSerializer
    pagination_class = PageNum


class SpecListAPIView(ListAPIView):
    queryset = SPUSpecification.objects.all()
    serializer_class = SpecSerializer
